<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="/WEB-TAG/platForm.tld" prefix="PF"%>
<!--查询条件表单-->
<div class="easyui-layout" data-options="fit:true">
	<div class="TableTitle" data-options="region:'north',border:false">
		<c:if test="${pageset.pageType==1}">新增${JSP_Messager_Title}记录</c:if>
		<c:if test="${pageset.pageType==2}">修改${JSP_Messager_Title}记录</c:if>
		<c:if test="${pageset.pageType==0}">浏览${JSP_Messager_Title}记录</c:if>
	</div>
	<div data-options="region:'center'">
		<form id="dom_formRules">
			<input type="hidden" id="entity_id" name="entity.id"
				value="${entity.id}">
			<c:if test="${pageset.pageType==1}">
				<input type="hidden" id="QUERYID" name="entity.queryid"
					value="${ids}">
			</c:if>
			<table class="editTable">
				<tr>
					<td class="title">
						名称:
					</td>
					<td>
						<input type="text" style="width: 120px;"
							class="easyui-validatebox"
							data-options="required:true,validType:[,'maxLength[64]']"
							id="entity_title" name="entity.title" value="${entity.title}">
					</td>
					<td class="title">
						字段:
					</td>
					<td>
						<input type="text" style="width: 120px;"
							class="easyui-validatebox"
							data-options="required:true,validType:[,'maxLength[64]']"
							id="entity_code" name="entity.code" value="${entity.code}">
					</td>
				</tr>
				<tr>
					<td class="title">
						匹配类型:
					</td>
					<td colspan="3">
						<select name="entity.sign" style="width: 120px;" id="entity_sign"
							val="${entity.sign}">
							<option value="=">
								等于
							</option>
							<option value="like">
								like
							</option>
							<option value="-like">
								%like
							</option>
							<option value="like-">
								like%
							</option>
							<option value="> ">
								大于
							</option>
							<option value="< ">
								小于
							</option>
							<option value=">=">
								大于等于
							</option>
							<option value="<=">
								小于等于
							</option>
							<option value="SQL">
								自定义
							</option>
						</select>自定义类型时用"_value_"代表值。如：(a.id=_value_)<br/>
					</td>
				</tr>
				<tr>
					<td class="title">
						自定义条件:
					</td>
					<td colspan="3">
						<textarea rows="2" style="width: 360px;"
							class="easyui-validatebox"
							data-options="validType:[,'maxLength[64]']" id="entity_sqlrule"
							name="entity.sqlrule">${entity.sqlrule}</textarea>
					</td>
				</tr>
				<tr>
					<td class="title">
						表单类型:
					</td>
					<td>
						<select name="entity.type" style="width: 120px;" id="entity_type"
							val="${entity.type}">
							<option value="1">
								文本
							</option>
							<option value="2">
								枚举[type:title,type2:title2,...]
							</option>
							<option value="3">
								数据字典[key]
							</option>
							<option value="4">
								日历控件[yyyyMMddHHmmss]
							</option>
						</select>
					</td>
					<td class="title">
						表单排序:
					</td>
					<td>
						<input type="text" style="width: 120px;"
							class="easyui-validatebox"
							data-options="required:true,validType:['integer','maxLength[5]']"
							id="entity_sort" name="entity.sort" value="${entity.sort}">
					</td>
				</tr>
				<tr>
					<td class="title">
						表单参数:
					</td>
					<td colspan="3">
						<input type="text" style="width: 360px;"
							class="easyui-validatebox"
							data-options="validType:[,'maxLength[64]']" id="entity_typepara"
							name="entity.typepara" value="${entity.typepara}">
					</td>
				</tr>

			</table>
		</form>
	</div>
	<div data-options="region:'south',border:false">
		<div class="div_button" style="text-align: center; padding: 4px;">
			<c:if test="${pageset.pageType==1}">
				<a id="dom_add_entityRules" href="javascript:void(0)"
					iconCls="icon-save" class="easyui-linkbutton">增加</a>
			</c:if>
			<c:if test="${pageset.pageType==2}">
				<a id="dom_edit_entityRules" href="javascript:void(0)"
					iconCls="icon-save" class="easyui-linkbutton">修改</a>
			</c:if>
			<a id="dom_cancle_formRules" href="javascript:void(0)"
				iconCls="icon-cancel" class="easyui-linkbutton"
				style="color: #000000;">取消</a>
		</div>
	</div>
</div>
<script type="text/javascript">
	var submitAddActionRules = 'admin/FarmFormsRulesaddCommit.do';
	var submitEditActionRules = 'admin/FarmFormsRuleseditCommit.do';
	var currentPageTypeRules = '${pageset.pageType}';
	var submitFormRules;
	$(function() {
		//表单组件对象
		submitFormRules = $('#dom_formRules').SubmitForm( {
			pageType : currentPageTypeRules,
			grid : gridRules,
			currentWindowId : 'winRules'
		});
		//关闭窗口
		$('#dom_cancle_formRules').bind('click', function() {
			$('#winRules').window('close');
		});
		//提交新增数据
		$('#dom_add_entityRules').bind('click', function() {
			submitFormRules.postSubmit(submitAddActionRules);
		});
		//提交修改数据
		$('#dom_edit_entityRules').bind('click', function() {
			submitFormRules.postSubmit(submitEditActionRules);
		});
	});
	//-->
</script>